package mn.idax.exchange.otc.task;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.dangdang.elasticjob.lite.annotation.ElasticSimpleJob;
import mn.idax.exchange.otc.mapper.OTCCertificateMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@ElasticSimpleJob(cron="0 0/5 * * * ?")
@Component
public class OtcCertificateExpiredJob implements SimpleJob {
    @Autowired
    private OTCCertificateMapper otcCertificateMapper;

    @Override
    public void execute(ShardingContext shardingContext) {
        // otc资格过期
        otcCertificateMapper.updateExpired();
    }
}
